import { getLevelFirst, getLevelZero, getUserID } from '@/utils';

const ManageTabSwitch: any = (curRes: Record<string, any>) => {
  if (curRes?.['/purchasePlanController/applyCompanyID']) {
    // 公司权限
    return {
      params: 'applyCompanyID',
      applyCompanyID: getLevelZero(),
    };
  } else if (curRes?.['/purchasePlanController/applyDepartmentID']) {
    return {
      params: 'applyDepartmentID',
      applyDepartmentID: getLevelFirst(),
    };
  } else if (curRes?.['/purchasePlanController/applyerID']) {
    return {
      params: 'applyerID',
      applyerID: getUserID(),
    };
  }
};
export { ManageTabSwitch };
